package com.xiangyueEducation.uploaderCloud.pojo.dto;

import com.xiangyueEducation.uploaderCloud.utils.Result;
import com.xiangyueEducation.uploaderCloud.utils.enums.ResultCodeEnum;
import lombok.Data;

@Data
public class PageQuery {
    private Integer pageNo;
    private Integer pageSize;

    public Result checkPage(){
        Integer pageNo = this.getPageNo();
        Integer pageSize = this.getPageSize();
        if (pageNo<=0||pageSize<=0||pageSize>30){
            return Result.build(null, ResultCodeEnum.PAGE_PARAMETER_SIEZ_ERROR);
        }
        return null;
    }
}
